﻿#ifndef JZ_LOG_WIDGET_H_
#define JZ_LOG_WIDGET_H_

#include <QWidget>
#include <QTableWidget>
#include "../jzCommon/JZLogManager.h"

class JZLogWidget : public QWidget
{
    Q_OBJECT

public:
    JZLogWidget(QWidget *parent = nullptr);
    ~JZLogWidget();

    void addLog(JZLogObjectPtr obj);

protected slots:    
    void onBtnClearClicked();
    void onBtnSettingClicked();

private:
    void updateLog();
    void addLogItem(JZLogObject *obj);

    QVector<JZLogObjectPtr> m_logList;
    QStringList m_levelList;        

    QTableWidget *m_tableWidget;
};

#endif